<?php

namespace App\Admin\Actions\Aliyun;

use App\Admin\Forms\Aliyun\PlayerDomainForm;
use Dcat\Admin\Grid\Tools\AbstractTool;
use Dcat\Admin\Widgets\Modal;
use Throwable;

class MakePlayerDomain extends AbstractTool
{
    protected string $title = '选手域名';

    protected string $style = 'btn btn-primary waves-effect';

    /**
     * @throws Throwable
     */
    public function render(): string
    {
        return Modal::make()
            ->lg()
            ->centered()
            ->title('创建'.$this->title)
            ->body(PlayerDomainForm::make())
            ->button('<button class="'.$this->style.'">'.$this->title.'</button>')
            ->render();
    }
}
